<include file="Public:header" />
<div class="container">
	
	<div class="page-header">
		<h4>{:L('FINANCE')}<small> - <a href="{:U('finance/index','t=receivables')}">{:L('RECEIVABLES')}</a> | 
		<a href="{:U('finance/index','t=payables')}">{:L('PAYABLES')}</a> | 
		<a href="{:U('finance/index','t=receivingorder')}">{:L('RECEIVINGORDER')}</a> | 
		<a class="active" href="{:U('finance/index','t=paymentorder')}">{:L('PAYMENTORDER')}</a> | <a href="{:U('finance/analytics')}">{:L('STATISTICS')}</a></small> </h4>
	</div>
	<include file="Public:alert" />	
	<p class="view">
		<if condition="$info['is_deleted'] eq 0">
		<a href="{:U('finance/edit','t=paymentorder&id='.$info['paymentorder_id'])}">{:L('EDIT')}</a> |
		<a href="{:U('finance/delete','t=paymentorder&id='.$info['paymentorder_id'])}" class="del_confirm">{:L('DELETE')}</a> | 
		</if>
		<a href="javascript:void(0);" type="button" onclick="javascript:history.go(-1)" >{:L('RETURN')}</a>
	</p>
	<div class="row">
		<div class="tabbable span12"> 
			<div class="tab-content">
					<table class="table table-hover">
						<tbody>
							<tr>
								<th colspan="4">{:L('SINGLE PAYMENT DETAILS')}</th>
							</tr>
							<tr>
								<td class="tdleft" width="15%"><b>{:L('PAYMENTS SINGLE NUMBER')}</b>:</td>
								<td>{$info.name}</td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('PAYABLES NAME')}</b>:</td>
								<td>{$info['payables_name']}</td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('CONTRACT NUMBER')}</b>:</td>
								<td><a href="{:U('contract/view', 'id='.$info['other']['contract_id'])}">{$info.other.number}</a></td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('BUSINESS')}</b>:</td>
								<td><a href="{:U('business/view','id='.$info['other']['business_id'])}" >{$info.other.business_name}</a></td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('CUSTOMER')}</b>:</td>
								<td><a href="{:U('customer/view','id='.$info['other']['customer_id'])}" >{$info.other.customer_name}</a></td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('PAYMENT TIME')}</b>:</td>
								<td>{$info['pay_time']|date="Y-m-d",###}</td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('PAYMENTS')}</b>:</td>
								<td>{$info['money']}</td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('STATUS')}</b>:</td>
								<td><if condition="$info['status'] eq 1">{:L('HAS CLOSING')}<else />{:L('NOT CLOSING')}</if></td>
							</tr>
							<if condition="$info['status'] eq 1">
							<tr>
								<td class="tdleft"><b>{:L('CHECKOUT TIME')}</b>:</td>
								<td>{$info['update_time']|date="Y-m-d",###}</td>
							</tr>
							</if>
							<tr>
								<td class="tdleft"><b>{:L('OWNER_ROLE')}</b>:</td>
								<td><a class="role_info" rel="{$info['owner_role_id']}" href="javascript:void(0)">{$info[owner]['user_name']}</a></td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('CREATOR_ROLE')}</b>:</td>
								<td><a class="role_info" rel="{$info['creator_role_id']}" href="javascript:void(0)">{$info['creator_name']}</a></td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('CREATE_TIME')}</b>:</td>
								<td>{$info['create_time']|date="Y-m-d",###}</td>
							</tr>
							<tr>
								<td class="tdleft"><b>{:L('DESCRIPTION')}</b>:</td>
								<td colspan="3"><if condition="$info.description neq null"><pre>{$info.description}</pre></if></td>
							</tr>
						</tbody>
					</table>
			</div>
		</div>
	</div>
</div>
<div class="hide" id="dialog-role-info" title="{:L('DIALOG_USER_INFO')}">loading...</div>
<script type="text/javascript">
<if condition="C('ismobile') eq 1">width=$('.container').width() * 0.9;<else />width=800;</if>
	$("#dialog-role-info").dialog({
		autoOpen: false,
		modal: true,
		width: width,
		maxHeight: 600,
		position: ["center",100]
	});
	$(function(){
		$(".role_info").click(function(){
			$role_id = $(this).attr('rel');
			$('#dialog-role-info').dialog('open');
			$('#dialog-role-info').load('{:U("user/dialoginfo","id=")}'+$role_id);
		});
	});
</script>
<include file="Public:footer" />